﻿<!DOCTYPE html>
<html lang="zh">

<head resource>
    <meta charset="utf-8">
    <include file="../inc/meta.inc" />
    <title>绑定手机号</title>
</head>

<body>
    <div id="vapp" v-cloak>
        <el-form ref="account" :model="account" @submit.native.prevent label-width="120px" v-if="isbind">
            <el-form-item label="" prop="Ac_AccName">
                <avatar :account="account" circle="true" size="30"></avatar>
                {{account.Ac_Name}}
                <span class="accname">( {{account.Ac_AccName}} )</span>               
            </el-form-item>
            <el-form-item label="移动电话" prop="Ac_MobiTel1">
                <el-input v-model="account.Ac_MobiTel1" style="width:200px" :disabled="true">
                    <icon slot="prefix">&#xe66c</icon>
                </el-input>
            </el-form-item>
            <el-form-item label=""  prop="bind">
                <el-tag type="success"> 已经绑定</el-tag>
            </el-form-item>
            <el-form-item label="" v-if="false">
                <el-checkbox v-model="account.Ac_IsOpenMobi">是否公开</el-checkbox>
            </el-form-item>
        </el-form>
        <!-- 未绑定-->
        <el-form ref="form" :model="form" :rules="sms_rules" @submit.native.prevent label-width="120px" v-else>
            <el-form-item label="" prop="Ac_AccName">
                <avatar :account="account" circle="true" size="30"></avatar>
                {{account.Ac_Name}}
                <span class="accname">( {{account.Ac_AccName}} )</span>
            </el-form-item>
            <el-form-item label="移动电话" prop="phone">
                <el-input v-model="form.phone" style="width:160px" :disabled="sms_seconds>0">
                    <icon slot="prefix">&#xe66c</icon>
                </el-input>
                <el-tag type="warning"> 未绑定</el-tag>
            </el-form-item>
            <el-form-item label=" " prop="sms">
                <el-input v-model="form.sms" style="width:160px" prop>
                    <icon slot="prefix">&#xe76e</icon>
                </el-input>             
                <loading bubble v-if="loading_sms"></loading>
                <span v-else-if="sms_seconds>0">{{sms_seconds}}秒后重发</span>
                <el-button type="primary" v-else plain @click="getsms('form')">获取验证码</el-button>
            </el-form-item>
        </el-form>
        <div class="footer">
            <el-button type="primary" v-if="isbind" define="enter" :loading="loading" @click="phoneUnbind()">
                取消绑定
            </el-button>
            <el-button type="primary" v-else define="enter" :loading="loading" @click="phonebind('form')">
                绑定手机
            </el-button>
            <el-button type='close'>
                取消
            </el-button>
        </div>
    </div>


</body>

</html>